<template>
	<view class="deivceGoBack">
		<!-- 设备归还 主页面 -->
		<navBar title="设备归还" goBackUrl="/pages/homePage/platform" @goBack="goBack"></navBar>
		
		<view class="content">
			<view class="center">
				<view class="nav">
					<image class="img1" src="/subpackage-equipment/static/guihuan2.png" mode="" @click="getClick(0)"></image>
					
					<image class="img1" src="/subpackage-equipment/static/look2.png" mode="" @click="getClick(1)"></image>
				</view>
				
				
				<!-- 待归还 -->
				<goBack v-if="isShow"></goBack>
				<!-- 查看记录 -->
				<goBackLook v-else></goBackLook>
			</view>
		</view>
	</view>
</template>

<script>
	import navBar from "@/components/navBar/navBar.vue"
	import goBack from "./components/goBack.vue"
	import goBackLook from "./components/goBackLook.vue"
	export default {
		name: "deivceGoBack",
		components: {
			navBar, goBack, goBackLook
		},
		data() {
			return {
				isShow: true,
			}
		},
		methods:{
			getClick(num){
				if(num === 0){
					this.isShow = true
				}else{
					this.isShow = false
				}
			},
			
			// 返回上一级
			goBack(url){
				uni.switchTab({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.deivceGoBack{
		/* #ifdef MP-WEIXIN */
			padding-top: 180rpx;
		/* #endif */
		.content{
			background-color: #F5F7FA;
			padding-top: 30rpx;
			.center{
				background-color: #FFFFFF;
				padding:0rpx 28rpx;
				.nav{
					padding-top:20rpx;
					display: flex;
					justify-content: space-between;
					height: 113rpx;
					margin-bottom: 10rpx;
				}
				.img1{
					width: 328rpx;
					height: 96rpx;
				}
			}
		}
	}
</style>
